<p>login works!</p>

<form #f="ngForm" (ngSubmit)="onSubmit(f)" novalidate>
  <input name="username" ngModel required #first="ngModel">
  <input name="password" ngModel>
  <button>登陆</button>
</form>
